package com.mms.pojo;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by dangz on 2017/5/18/018.
 */
@Entity
@Table(name = "sys_manager")
public class SysManager implements Serializable {
    private Long id;
    private String account;
    private String password;
    private String name;
    private String addTime;
    private String updateTime;
    private String lastLoginTime;
    private SysRole sysRole;
    private Integer status;
    private String remark;
    private SysManager sysManager;
    private String loginIp;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    @Column(name = "account")
    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }
    @Column(name = "password")
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "addtime")
    public String getAddTime() {
        return addTime;
    }

    public void setAddTime(String addTime) {
        this.addTime = addTime;
    }
    @Column(name = "updatetime")
    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
    @Column(name = "lastLoginTime")
    public String getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(String lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "role")
    public SysRole getSysRole() {
        return sysRole;
    }

    public void setSysRole(SysRole sysRole) {
        this.sysRole = sysRole;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "hid")
    public SysManager getSysManager() {
        return sysManager;
    }

    public void setSysManager(SysManager sysManager) {
        this.sysManager = sysManager;
    }
    @Column(name = "loginIp")
    public String getLoginIp() {
        return loginIp;
    }

    public void setLoginIp(String loginIp) {
        this.loginIp = loginIp;
    }
}
